Doing DoD specification work and must count the 'shalls' in a module ..err.. actually count the objects with shall. I figure to write a 'bool fHasShall(string Text)' function that determines if there is a 'shall' statement in the raw text. I'd like this function to detect actual 'shall' words, EXCLUDE such things as: |
Re: What's a 'shall' statement There is a buffer function keyword that will do the job. Set the string equal to the buffer and then use keyword on it. |
Re: What's a 'shall' statement |
Re: What's a 'shall' statement Something like this should do the job: Regexp hasShall = regexp " |
Re: What's a 'shall' statement Rolan - Fri Apr 17 12:08:44 EDT 2009 Here is the Regexp in an attachment. Attachments attachment_14242074_hasShall_Regexp.txt |
Re: What's a 'shall' statement Rolan - Fri Apr 17 12:15:26 EDT 2009 Use the keyword function as suggested. Also take a look at the contains function. I am sure using these would be faster that using regular expressions anyway. |